#include "constrain.h"

#include "../hed/entity/edge.h"
#include "../hed/entity/vertex.h"



Constrain::Constrain( Vertex* _vertex )
: m_vertex( _vertex )
, m_attribute( NULL )
, m_nodeId( 0 )
{
}


bool 
Constrain::isSelected()
{
  return m_vertex->isSelected();
}


void 
Constrain::getCenter( double& _xc, double& _yc )
{
  _xc = m_vertex->getPoint()->getX();
  _yc = m_vertex->getPoint()->getY();
}



int 
Constrain::getIdFromMesh()
{
  return m_nodeId; 
}



void 
Constrain::setIdFromMesh( int _id )
{
  m_nodeId = _id; 
}
